/*
 * @Date: 2024-01-11 09:27:48
 * @LastEditors: lyx
 * @LastEditTime: 2024-01-11 16:20:23
 * @FilePath: \chlor-alkali-cloud-mobile-end\src\pages\integral\appeal\Record\index.tsx
 * @Description: 申诉记录
 */
import { View } from "@tarojs/components";
import styles from "./index.module.scss";
import BaseLayout from "@/components/BaseLayout";
import RecordItem from "./components/RecordItem";
import useAppealRecord from "./hooks/useAppealRecord";
import React from "react";

function Record() {
  const appealRecordInst = useAppealRecord();
  console.log("appealRecordInst", appealRecordInst);
  return (
    <View className={styles["appeal-record-wrapper"]}>
      <BaseLayout.Layout className="bg-gray">
        <BaseLayout.Body style={{ margin: "1rem" }}>
          {appealRecordInst?.dataSourcePageState?.dataSourceList?.map(
            (item, index) => (
              <BaseLayout.Card className={styles["card-wrapper"]} key={index}>
                <RecordItem
                  {...item}
                  onClick={() => {
                    appealRecordInst.toDetail(item);
                  }}
                />
              </BaseLayout.Card>
            )
          )}
        </BaseLayout.Body>
      </BaseLayout.Layout>
    </View>
  );
}

export default Record;
